package main

import (
	"blogx_server/core"
	"blogx_server/flags"
	"blogx_server/global"
	"blogx_server/models/enum"
	"blogx_server/utils/jwts"
	"fmt"
)

func main() {
	flags.Parse()
	global.Config = core.ReadConf()
	core.InitLogrus()

	//生成
	token, err := jwts.GetToken(jwts.Claims{UserID: 11, Username: "博客管理员", Role: enum.AdminRole})
	fmt.Println(token, err)

	//解析
	cls, err := jwts.ParseToken(token)
	fmt.Println(cls, err)

}
